home *** CD-ROM | disk | FTP | other *** search
/ CD/PC Actual 3 / CD ACTUAL 3.iso / linux / incoming / jstools-.6v3 / jstools- / jstools-tk3.6v3.0 / lib / jdoc / panels / fileselector.jdoc next >
Encoding:
Text File  |  1995-03-14  |  6.5 KB  |  50 lines

  1. {The jstools File Selector Panel
  2.  
  3. Introduction
  4. The jstools package provides a File Selector Panel, shared by several applications, which lets you select a file (or directory) name.  It's typically used to specify file names to load data from or save data into.  Some applications may use it for other purposes, such as to specify the directory to move a file into, or to choose a file to delete.  Also, in some applications it may provide an option menu that lets you choose a file format.
  5.  
  6. The File Selector Panel is implemented by the jfs.tcl library; if you're a Tk programmer, you can use it in your own applications.
  7.  
  8. This document describes the File Selector Panel provided by version 3.6/3.0 of the jstools libraries.
  9.  
  10. Usage
  11. The File Selector Panel contains a scrollable file list on the left showing the files and directories in the current directory, some buttons on the right which let you choose what to do, and a field at the bottom of the panel - typically labelled `File:' - that lets you type a file or directory name.  At the top, below a prompt, is a label which shows you the pathname of the current directory (the directory whose contents are displayed in the file list).  There's also a checkbox which lets you control whether directories are distinguished in the file list.
  12.  
  13. Buttons
  14. Several buttons may be displayed along the right¡hand edge of the panel.  Which buttons appear depends on how the filename you choose is going to be used, so different applications will provide different sets of buttons.  (OK, Cancel, and Home are the most commonly available buttons.)  The possible buttons are as follows:
  15.  
  16. OK
  17. The OK button tells the application to use the current filename (which appears in the `File:' field at the bottom of the panel) if it is a file, or moves into it if it's a directory.  Thus, the typical way to choose an existing file is to click on it in the file list and then click OK.  (You can specify a new file name by typing it in the `File:' field and clicking OK.)
  18.  
  19. Cancel
  20. The Cancel button tells the application that you don't want to perform the action for which the File Selector panel was brought up - e.g., you don't want to load a new file, or save the file you're working on.
  21.  
  22. Incidentally, you can always cancel by typing Control-c or Meta-period, even if the Cancel button isn't displayed (although if it's not, the application probably isn't prepared to cancel the operation).
  23.  
  24. Go Into
  25. The Go Into button moves into the currently¡selected filename (assuming it's a directory).  This is useful in some cases when the OK button isn't available.
  26.  
  27. Home
  28. The Home button moves to your home directory.
  29.  
  30. Root
  31. The Root button moves to the top¡level directory, `/'.
  32.  
  33. Here
  34. The Here button tells the application to use the current directory (whose name appears near the top of the panel and whose contents are displayed in the file list).
  35.  
  36. The bottommost button is the default button, and appears with a sunken border around it.  Pressing Return in the `File:' field, or double¡clicking in the file list, has the same effect as clicking on the default button (unless the currently¡selected filename is a directory).  Usually, OK is the default button.
  37.  
  38. The File List
  39. The file list in the left part of the panel displays the contents of the current directory.  At the top is the entry `..', which represents the parent directory.  Beneath that are listed all the files (including subdirectories) in the current directory.  Files whose name begins with a period appear after files whose name doesn't; other than that, files are sorted by ASCII collating order
  40.  
  41. Normally, directories in the file list have a trailing slash (/) appended so you can distinguish them from plain files.  This can be slow in large directories (or in directories in certain kinds of filesystems), so you can turn it off by selecting the `Fast' checkbox in the upper right or the `Fast file selector' checkbox on the Global Preferences panel.  (This option is saved the next time you save your global preferences.)   Turning this option on means that you won't be able to distinguish directories from other kinds of files visually in the file selector, so you won't know in advance what double¡clicking on an entry in the list will do; for that reason, I recommend you leave it off if your machine is fast enough.
  42.  
  43. Clicking on a file or directory name in the file list selects it and copies it into the `File:' field at the bottom of the panel.  Double¡clicking will then change directory into the selected file if it is a directory, or perform the action of the default button (typically OK) otherwise.
  44.  
  45. The Filename Entry
  46. At the bottom of the File Selector panel is an entry field labelled `File:' for typing a filename into.  Whenever you (single¡)click on a file or directory name in the list, it will be entered into this field for you, but you can also type filenames here.  (If you're creating a new file, of course, you'll need to type it's name; otherwise you can do everything with the mouse.)
  47.  
  48. File Types
  49. If the application lets you choose among several file types, an option menu will appear above the filename entry field.  This will display the current file type, and if you click on it with mouse button 1, a menu will pop up that lets you choose among the available file types.  Which types are available depends on the application.
  50. } {{{jdoc:xref:link {4.0 4.19 6.46 6.53 8.79 8.100 41.331 41.349}} {jdoc:anchor:anchorname {3.0 4.0 10.0 11.0 38.0 39.0 45.0 46.0 48.0 49.0}} {richtext:font:roman {2.0 3.0 4.0 4.4 4.11 6.46 6.53 8.83 8.90 10.0 11.0 13.0 14.0 16.0 17.0 19.0 20.0 22.46 22.55 22.59 22.70 24.0 25.0 27.0 28.0 30.0 31.0 31.51 31.52 33.0 34.0 36.99 36.105 36.220 36.226 38.0 39.0 39.118 39.120 41.62 41.63 45.0 46.0 48.0 49.0 50.0}} {richtext:font:italic {36.220 36.226}} {richtext:font:bold {4.4 4.11 6.46 6.53 8.83 8.90 22.46 22.55 22.59 22.70 36.99 36.105}} {richtext:font:typewriter {31.51 31.52 39.118 39.120 41.62 41.63}} {richtext:font:heading0 {1.0 2.0}} {richtext:font:heading1 {3.0 4.0 10.0 11.0 48.0 49.0}} {richtext:font:heading2 {13.0 14.0 38.0 39.0 45.0 46.0}} {richtext:font:heading3 {16.0 17.0 19.0 20.0 24.0 25.0 27.0 28.0 30.0 31.0 33.0 34.0}} {jdoc:link:jstools.jdoc {4.0 4.19}} {jdoc:link:jfs.tcl.jdoc {6.46 6.53}} {jdoc:link:jslibraries.jdoc {8.79 8.100}} {jdoc:link:panels/prefs.jdoc {41.331 41.349}} {jdoc:anchorname:Introduction {3.0 4.0}} {jdoc:anchorname:Usage {10.0 11.0}} {jdoc:anchorname:The_File_List {38.0 39.0}} {jdoc:anchorname:The_Filename_Entry {45.0 46.0}} {jdoc:anchorname:File_Types {48.0 49.0}}} {{abbrevstart 50.0} {matchend 11.17} {abbrevend 50.0} {insert 1.0} {anchor 50.0} {matchstart 11.9} {current 3.12}}}